Skip to content

Introduce QR Code node#3565

Merged
timon-schelling merged 6 commits intoGraphiteEditor:masterfrom
Sahil-Gupta584:qr-code-node
Feb 14, 2026
Merged

Introduce QR Code node#3565
timon-schelling merged 6 commits intoGraphiteEditor:masterfrom
Sahil-Gupta584:qr-code-node

Conversation

@Sahil-Gupta584
Copy link
Contributor

@Sahil-Gupta584 Sahil-Gupta584 commented Jan 2, 2026

Closes #3468

Do you have any suggestion ?

Current Implementation:

cursorful-video-1767354987148.mp4

@timon-schelling
Copy link
Member

!build

@timon-schelling
Copy link
Member

timon-schelling commented Jan 2, 2026

I suggest adding a flag that allows merging adjacent tiles (should be on by default in my opinion).

Should be optional, because not merging can also be useful for example in this usecase.
image

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

📦 Build Complete for 7073daa
https://59335d22.graphite.pages.dev

@Sahil-Gupta584
Copy link
Contributor Author

Sahil-Gupta584 commented Jan 3, 2026

Merged:
image
Unmerged:
image

(have renamed Merge to Merge Adjacent Tiles )

Looks good now ? @timon-schelling

@timon-schelling
Copy link
Member

That's just merging rows, not every adjacent tile. Can you fix that?

@Sahil-Gupta584
Copy link
Contributor Author

That's just merging rows, not every adjacent tile. Can you fix that?

image
  1. ig think all adjacent tiles(rows and columns) are merging already.
  2. you mean there shouldnt be gap btn 4 boxed-adjacent tiles?

@timon-schelling
Copy link
Member

Screenshot_20260103_164937_Chrome.jpg

As you can see here in your screenshot, row are merged, collums are not merged.
I can tell because the side has indents.

@TrueDoctor
Copy link
Member

Could we just make the shape be boxes and then use a boolean union operation to merge them? Or we could just use a manual flood fill to build contiguous regions

@Sahil-Gupta584
Copy link
Contributor Author

I tried using flood fill approach ( ig first one will be heavier):

cursorful-video-1767593925927.mp4

@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

github-actions bot commented Jan 5, 2026

📦 Build Complete for de5dc82
https://0c9fbd34.graphite.pages.dev

@Keavon
Copy link
Member

Keavon commented Jan 5, 2026

The node is currently nondeterministic. It produces different data every evaluation.

@Keavon Keavon changed the title adding qr code node New node: QR Code Jan 5, 2026
Copy link
Member

@Keavon Keavon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments. The most critical one is making the node deterministic.

@Keavon Keavon marked this pull request as draft January 5, 2026 21:32
@TrueDoctor
Copy link
Member

@Sahil-Gupta584 Due to the use of a Hash Set which uses randomization under the hood, the flood fill algorithm will start from a different point each time, leading to visually identical but different output in each evaluation. This should be relatively easy to fix since in some cases, the HashSet you used is just not necessary. You could for example replace the HashSet in initial calculation of the remaining pixels with a Vec etc., but please do yourself the favor of trying to understand the algorithm that is implemented and fix it without relying on ai tools for this task. The function is pretty sure and this might take a bit longer, but I think this would be a good learning opportunity

@Sahil-Gupta584
Copy link
Contributor Author

sure, thanks for the suggestions, looks interesting for me also!

@Sahil-Gupta584
Copy link
Contributor Author

So i tried making code more deterministic as well added few comments for understanding working.

@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

github-actions bot commented Jan 8, 2026

📦 Build Complete for 869a5f8
https://fa674ee4.graphite.pages.dev

@timon-schelling
Copy link
Member

error[E0599]: no function or associated item named `new_rect` found for struct `vector_types::Subpath<PointId>` in the current scope
   --> node-graph/nodes/vector/src/generator_nodes.rs:208:46
    |
208 |                     vector.append_subpath(subpath::Subpath::new_rect(corner1, corner2), false);
    |                                                             ^^^^^^^^ function or associated item not found in `vector_types::Subpath<_>`
    |
image

not working as intended

@timon-schelling
Copy link
Member

@Sahil-Gupta584 are you interested in continuing this?

@Sahil-Gupta584
Copy link
Contributor Author

@Sahil-Gupta584 are you interested in continuing this?

Yes of course, just need few more days more.

I will notify on discord after fixing ci and testing things.

@Keavon
Copy link
Member

Keavon commented Jan 30, 2026

!build

1 similar comment
@Keavon
Copy link
Member

Keavon commented Jan 31, 2026

!build

@github-actions
Copy link

📦 Build Complete for 499d087
https://6f5cd541.graphite.pages.dev

@TrueDoctor
Copy link
Member

In our testing, the flood fill now seems to work, so I guess we should give this another round of review

@timon-schelling timon-schelling marked this pull request as ready for review February 2, 2026 16:13
@timon-schelling
Copy link
Member

I guess having the ecc setting be exposed users would be useful.

@timon-schelling
Copy link
Member

I guess having the ecc setting be exposed to users would be useful.

I added this, I would be fine with merging. @TrueDoctor

@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

📦 Build Complete for 198f4f4
https://a1c7ac73.graphite.pages.dev

@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

📦 Build Complete for 0edacfa
https://dae7741e.graphite.pages.dev

@Sahil-Gupta584
Copy link
Contributor Author

Sorry guys couldnt be active much, having many things parallely.
Will try to update my other prs soon.

@timon-schelling timon-schelling changed the title New node: QR Code Add QR Code node Feb 12, 2026
@timon-schelling timon-schelling changed the title Add QR Code node Introduce QR Code node Feb 12, 2026
@timon-schelling
Copy link
Member

!build

@github-actions
Copy link

📦 Build Complete for fb48912
https://e3273c33.graphite.pages.dev

@timon-schelling timon-schelling merged commit 6c10364 into GraphiteEditor:master Feb 14, 2026
4 checks passed
@Keavon Keavon mentioned this pull request Feb 14, 2026
@Keavon
Copy link
Member

Keavon commented Feb 14, 2026

Please leave a comment in #3565 so you can be assigned to that issue.

@Sahil-Gupta584
Copy link
Contributor Author

You mean in #3468 ? done!

@Sahil-Gupta584 Sahil-Gupta584 mentioned this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QR Code Node

5 participants